import shutil
import os
import send2trash

path = '../chp8_file/test1/'

print("==================遍历目录树=======================")
for folderName, subfolders, filenames in os.walk(path):
    print()
    print(folderName)  # folderName:当前目录名称的字符串

    # subfolders:当前目录的子目录字符串列表
    for subfolder in subfolders:
        print("\t" + subfolder)

    # 当前目录中文件名称的字符串列表
    for filename in filenames:
        print("\t" + filename)
